package com.zhouyu.fileSync.FScommon.entities;


import java.util.ArrayList;
import java.util.List;

/**
 * Created by zhouyu@lightinthebox.com on 2019/8/7
 **/
public class FSClient {
    /**
     * client name,other client find you by this
     */
    private String clientName;
    /**
     * the Authentication data,each client who want to connect
     * to this client need hold the correct password
     */
    private String clientPassword;
    /**
     * client host
     */
    private String clientHost;
    /**
     * client port for rpc server
     */
    private int clientPort;
    /**
     * temp path for file
     */
    private String tempPath;
    /**
     * the files you want to get from target client
     * if target file dose not exist on the target client,
     * nothing will be done.
     * if target file exist on multiple client,
     * the newest file will be keep;
     */
    private List<FileRoute> targetFiles = new ArrayList<>();


    public FSClient() {
    }

    public FSClient(String clientName, String clientPassword, String clientHost, int clientPort,String tempPath, List<FileRoute> targetFiles) {
        this.clientName = clientName;
        this.clientPassword = clientPassword;
        this.clientHost = clientHost;
        this.clientPort = clientPort;
        this.tempPath = tempPath;
        this.targetFiles = targetFiles;
    }

    public String getClientName() {
        return clientName;
    }

    public void setClientName(String clientName) {
        this.clientName = clientName;
    }

    public String getClientPassword() {
        return clientPassword;
    }

    public void setClientPassword(String clientPassword) {
        this.clientPassword = clientPassword;
    }

    public String getClientHost() {
        return clientHost;
    }

    public void setClientHost(String clientHost) {
        this.clientHost = clientHost;
    }

    public int getClientPort() {
        return clientPort;
    }

    public void setClientPort(int clientPort) {
        this.clientPort = clientPort;
    }


    public List<FileRoute> getTargetFiles() {
        return targetFiles;
    }

    public void setTargetFiles(List<FileRoute> targetFiles) {
        this.targetFiles = targetFiles;
    }

    public String getTempPath() {
        return tempPath;
    }

    public void setTempPath(String tempPath) {
        this.tempPath = tempPath;
    }
}
